window = this;
var Window = function Window() {
    //容易被检测到的   通过堆栈
    throw new TypeError("Illegal constructor");
};
catvm.safefunction(Window);
//设置原型链上显示的名字***************************************************************************
Object.defineProperties(Window.prototype, {
    [Symbol.toStringTag]: {
        value: "Window",
        configurable: true
    }
});
Window.prototype.__proto__ = WindowProperties.prototype;
window.__proto__ = Window.prototype;


//该原型下的属性与函数***************************************************************************
window._cf_chl_opt = {}// 5s盾参数 纯净
window.alert = function alert(e) {
};
catvm.safefunction(window.alert);
window.length = 0;
window.top = window;
window.DOMParser = DOMParser;
window.outerHeight = 1080
window.innerHeight = 975
window.outerWidth = 1920
window.innerWidth = 1920
window.closed = false;
window.indexedDB = catvm.proxy(class indexedDB {
});
Window.prototype.PERSISTENT = 1;
Window.prototype.TEMPORARY = 0;

window.RTCPeerConnection = function RTCPeerConnection() {
    catvm.debugger_()
};
catvm.safefunction(window.RTCPeerConnection);
window.open = function open() {
    catvm.debugger_()
};
catvm.safefunction(window.open);
window.atob = function atob(e) {
    // return catvm.Base64.decode(e + '')
    return Buffer.from(e, 'base64').toString('latin1');
};
catvm.safefunction(window.atob);
window.btoa = function btoa(e) {
    const buf = Buffer.from(e, 'latin1');
    return buf.toString('base64');
    // return catvm.Base64.encode(e + '')
};

catvm.safefunction(window.btoa);
window.setTimeout = async function setTimeout(x, d, c, b) {
    //x有可能是方法也有可能是文本
    // debugger
    catvm.debugger_()
    if (d === 0) {
        typeof (x) == "function" ? c === undefined ? x() : x(c) : undefined;
        typeof (x) == "string" ? eval(x) : undefined;
    } else {
        catvm.memory.setTimeout.push({
            name: x,
            arg: c
        })
    }
    //正确应该生成UUID并且保存到内存
    return 0;
};
window.setInterval = function setInterval(x, d, c) {
    //x有可能是方法也有可能是文本
    catvm.debugger_()
    if (d < 1000) {
        typeof (x) == "function" ? c === undefined ? x() : x(c) : undefined;
        typeof (x) == "string" ? eval(x) : undefined;
    }
    console.log(x.toString())
    //正确应该生成UUID并且保存到内存
    return 0;
};
catvm.safefunction(window.setInterval);
//代理***************************************************************************
window = new catvm.proxy(window);
Window = new catvm.proxy(Window);

// 过debugger;
// var _Function = window.Function;
// var Function = function () {
//     var args = Array.prototype.slice.call(arguments, 0, -1).join(","), src = arguments[arguments.length - 1]
//     if (args.indexOf("debugger") != -1) {
//         return function () {
//         };
//     }
//     return _Function.apply(this, arguments)
// }

// async function JiuJian_settimeout(a, b, c) {
//     console.log("计算时间")
// var now_time = (new Date()).getTime()
// while ((new Date()).getTime() - now_time < a) {
// }
// console.log("等待完毕")
// b(c)
// console.log("执行完毕")
// }

// (function qwe(e) {
//     JiuJian_settimeout(2000)
//     console.log(123)
// })()



